home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus Leser 19 / Amiga Plus Leser CD 19.iso / Tools / ShareMailGiftware / proof.library / dev / includes / imageio / imagegeneric.h
Encoding:
C/C++ Source or Header  |  2002-11-17  |  2.2 KB  |  84 lines

  1. #ifndef IMAGEGENERIC_H
  2. #define IMAGEGENERIC_H
  3.  
  4. /*
  5. **    $VER: imagegeneric.h 1.0 (30.6.2000)
  6. **
  7. **    Generic image definitions and formats.
  8. **
  9. **    © Paul Huxham
  10. */
  11.  
  12. #ifndef EXEC_TYPES_H
  13. #include "exec/types.h"
  14. #endif
  15.  
  16. #ifndef DOS_DOS_H
  17. #include <dos/dos.h>
  18. #endif
  19.  
  20. #ifndef UTILITY_TAGITEM_H
  21. #include <utility/tagitem.h>
  22. #endif
  23.  
  24. /*========================================================================*/
  25. /* Colour spaces */
  26. enum
  27. {
  28.     IMCS_UNKNOWN = 0,
  29.     IMCS_RGB, // RGB triplets
  30.     IMCS_GREY, // Greyscale
  31.     IMCS_ARGB, // ARGB quads
  32.     IMCS_RGBA, // ARGB quads
  33. };
  34.  
  35. /*========================================================================*/
  36. /* Filetypes */
  37. enum
  38. {
  39.     IMGF_UNKNOWN = 0, IMGF_ANIM, IMGF_BMP, IMGF_FAXX, IMGF_GIF, IMGF_ICON, IMGF_ILBM, IMGF_IFF24, IMGF_JPEG,
  40.     IMGF_MACPAINT, IMGF_PBM, IMGF_PCD, IMGF_PCX, IMGF_PICT, IMGF_PNG, IMGF_POSTSCRIPT, IMGF_TARGA,
  41.     IMGF_TIFF, IMGF_YCRCB, IMGF_YUVN, IMGF_SCREEN, IMGF_MPEG, IMGF_IMG, IMGF_PNM,
  42. };
  43.  
  44. /*========================================================================*/
  45. /* Description - Format (bits/flags) */
  46. #define IMFB_PLANAR 0
  47. #define IMFB_CHUNKY 1
  48. #define IMFB_HAM6 2
  49. #define IMFB_HALFBRITE 3
  50. #define IMFB_HAM8 4
  51. #define IMFB_24BIT 5
  52. #define IMFB_PALETTE 6
  53. #define IMFB_GREY 7
  54.  
  55. #define IMFF_PLANAR (1L << IMFB_PLANAR) /* Image data is planar */
  56. #define IMFF_CHUNKY (1L << IMFB_CHUNKY) /* Image data is chunky */
  57. #define IMFF_HAM6 (1L << IMFB_HAM6) /* Image data is HAM6 */
  58. #define IMFF_HALFBRITE (1L << IMFB_HALFBRITE) /* Image data is HALFBRITE */
  59. #define IMFF_HAM8 (1L << IMFB_HAM8) /* Image data is HAM8 */
  60. #define IMFF_24BIT (1L << IMFB_24BIT) /* Image data is 24bit */
  61. #define IMFF_PALETTE (1L << IMFB_PALETTE) /* Image data is palette mapped */
  62. #define IMFF_GREY (1L << IMFB_GREY) /* Image data is greyscale */
  63.  
  64. /* Flags/Depth example:
  65.  
  66.     NOTE: for planar images, the depth is the number of planes, not the
  67.                 number of colours.
  68.  
  69.     IMFF_PLANAR and 2 == 4 colour planar image
  70.  
  71.     IMFF_PLANAR | IMFF_HAM8 and 8 == 256 colour planar image in HAM8 mode.
  72.  
  73.     IMFF_CHUNKY and 24 == 24 Bit RGB pixels.
  74.  
  75.     IMFF_CHUNKY and 18 == 18 Bit RGB pixels.
  76.  
  77.     IMFF_PLANAR and 24 == 24 Bit planar (IFF24).
  78.  
  79.     If IMFF_PALETTE is set, then the image is palette mapped, eg gif
  80.  
  81.     If IMFF_GREY is set, the the image is greyscale and not colour.
  82. */
  83. #endif /* IMAGEGENERIC_H */
  84.